<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Layui(v1.0.9) 文件上传</title>
	<link rel="stylesheet" href="../js/layui_v1.0.9/css/layui.css">
	<script type="text/javascript" src="../js/layui_v1.0.9/lay/dest/layui.all.js"></script>
	<style>
		body{margin: 20px 50px;}
	</style>
</head>
<body>
	<!-- 默认上传图片 -->
	<input type="file" name="file" class="layui-upload-file">
	<input type="file" name="file" lay-type="file" class="layui-upload-file">
	<script>
		layui.upload({
		  	url: 'php/upload_one.php'
		  	,success: function(res){
		    	console.log(res); //上传成功返回值，必须为json格式
		  	}
		});  
	</script>
</body>
</html>